3.3033 \(\int (a+b x) (c+d x)^{-3+n} (e+f x)^{-n} \, dx\)

Optimal. Leaf size=123 \[ \frac{(b c-a d) (c+d x)^{n-2} (e+f x)^{1-n}}{d (2-n) (d e-c f)}+\frac{(c+d x)^{n-1} (e+f x)^{1-n} (a d f+b (c f (1-n)-d e (2-n)))}{d (1-n) (2-n) (d e-c f)^2} \]

[Out]

((b*c - a*d)*(c + d*x)^(-2 + n)*(e + f*x)^(1 - n))/(d*(d*e - c*f)*(2 - n)) + ((a
*d*f + b*(c*f*(1 - n) - d*e*(2 - n)))*(c + d*x)^(-1 + n)*(e + f*x)^(1 - n))/(d*(
d*e - c*f)^2*(1 - n)*(2 - n))

_______________________________________________________________________________________

Rubi [A]  time = 0.194123, antiderivative size = 122, normalized size of antiderivative = 0.99, number of steps used = 2, number of rules used = 2, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.083 \[ \frac{(b c-a d) (c+d x)^{n-2} (e+f x)^{1-n}}{d (2-n) (d e-c f)}+\frac{(c+d x)^{n-1} (e+f x)^{1-n} (a d f+b c f (1-n)-b d e (2-n))}{d (1-n) (2-n) (d e-c f)^2} \]

Antiderivative was successfully verified.

[In]  Int[((a + b*x)*(c + d*x)^(-3 + n))/(e + f*x)^n,x]

[Out]

((b*c - a*d)*(c + d*x)^(-2 + n)*(e + f*x)^(1 - n))/(d*(d*e - c*f)*(2 - n)) + ((a
*d*f + b*c*f*(1 - n) - b*d*e*(2 - n))*(c + d*x)^(-1 + n)*(e + f*x)^(1 - n))/(d*(
d*e - c*f)^2*(1 - n)*(2 - n))

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 23.7484, size = 88, normalized size = 0.72 \[ \frac{\left (c + d x\right )^{n - 2} \left (e + f x\right )^{- n + 1} \left (a d - b c\right )}{d \left (- n + 2\right ) \left (c f - d e\right )} + \frac{\left (c + d x\right )^{n - 1} \left (e + f x\right )^{- n + 1} \left (a d f + b \left (c f \left (- n + 1\right ) - d e \left (- n + 2\right )\right )\right )}{d \left (- n + 1\right ) \left (- n + 2\right ) \left (c f - d e\right )^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((b*x+a)*(d*x+c)**(-3+n)/((f*x+e)**n),x)

[Out]

(c + d*x)**(n - 2)*(e + f*x)**(-n + 1)*(a*d - b*c)/(d*(-n + 2)*(c*f - d*e)) + (c
 + d*x)**(n - 1)*(e + f*x)**(-n + 1)*(a*d*f + b*(c*f*(-n + 1) - d*e*(-n + 2)))/(
d*(-n + 1)*(-n + 2)*(c*f - d*e)**2)

_______________________________________________________________________________________

Mathematica [A]  time = 0.247603, size = 82, normalized size = 0.67 \[ \frac{(c+d x)^{n-2} (e+f x)^{1-n} (-a c f (n-2)+a d e (n-1)+a d f x-b c (e+f (n-1) x)+b d e (n-2) x)}{(n-2) (n-1) (d e-c f)^2} \]

Antiderivative was successfully verified.

[In]  Integrate[((a + b*x)*(c + d*x)^(-3 + n))/(e + f*x)^n,x]

[Out]

((c + d*x)^(-2 + n)*(e + f*x)^(1 - n)*(-(a*c*f*(-2 + n)) + a*d*e*(-1 + n) + a*d*
f*x + b*d*e*(-2 + n)*x - b*c*(e + f*(-1 + n)*x)))/((d*e - c*f)^2*(-2 + n)*(-1 +
n))

_______________________________________________________________________________________

Maple [A]  time = 0.008, size = 161, normalized size = 1.3 \[ -{\frac{ \left ( dx+c \right ) ^{-2+n} \left ( fx+e \right ) \left ( bcfnx-bdenx+acfn-aden-adfx-bcfx+2\,bdex-2\,acf+ade+bce \right ) }{ \left ({c}^{2}{f}^{2}{n}^{2}-2\,cdef{n}^{2}+{d}^{2}{e}^{2}{n}^{2}-3\,{c}^{2}{f}^{2}n+6\,cdefn-3\,{d}^{2}{e}^{2}n+2\,{c}^{2}{f}^{2}-4\,cdef+2\,{d}^{2}{e}^{2} \right ) \left ( fx+e \right ) ^{n}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((b*x+a)*(d*x+c)^(-3+n)/((f*x+e)^n),x)

[Out]

-(d*x+c)^(-2+n)*(f*x+e)*(b*c*f*n*x-b*d*e*n*x+a*c*f*n-a*d*e*n-a*d*f*x-b*c*f*x+2*b
*d*e*x-2*a*c*f+a*d*e+b*c*e)/(c^2*f^2*n^2-2*c*d*e*f*n^2+d^2*e^2*n^2-3*c^2*f^2*n+6
*c*d*e*f*n-3*d^2*e^2*n+2*c^2*f^2-4*c*d*e*f+2*d^2*e^2)/((f*x+e)^n)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \int{\left (b x + a\right )}{\left (d x + c\right )}^{n - 3}{\left (f x + e\right )}^{-n}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x + a)*(d*x + c)^(n - 3)/(f*x + e)^n,x, algorithm="maxima")

[Out]

integrate((b*x + a)*(d*x + c)^(n - 3)*(f*x + e)^(-n), x)

_______________________________________________________________________________________

Fricas [A]  time = 0.278419, size = 437, normalized size = 3.55 \[ \frac{{\left (2 \, a c^{2} e f -{\left (2 \, b d^{2} e f -{\left (b c d + a d^{2}\right )} f^{2} -{\left (b d^{2} e f - b c d f^{2}\right )} n\right )} x^{3} -{\left (b c^{2} + a c d\right )} e^{2} -{\left (2 \, b d^{2} e^{2} + 2 \, b c d e f -{\left (b c^{2} + 3 \, a c d\right )} f^{2} -{\left (b d^{2} e^{2} + a d^{2} e f -{\left (b c^{2} + a c d\right )} f^{2}\right )} n\right )} x^{2} +{\left (a c d e^{2} - a c^{2} e f\right )} n +{\left (2 \, a c d e f + 2 \, a c^{2} f^{2} -{\left (3 \, b c d + a d^{2}\right )} e^{2} -{\left (b c^{2} e f + a c^{2} f^{2} -{\left (b c d + a d^{2}\right )} e^{2}\right )} n\right )} x\right )}{\left (d x + c\right )}^{n - 3}}{{\left (2 \, d^{2} e^{2} - 4 \, c d e f + 2 \, c^{2} f^{2} +{\left (d^{2} e^{2} - 2 \, c d e f + c^{2} f^{2}\right )} n^{2} - 3 \,{\left (d^{2} e^{2} - 2 \, c d e f + c^{2} f^{2}\right )} n\right )}{\left (f x + e\right )}^{n}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x + a)*(d*x + c)^(n - 3)/(f*x + e)^n,x, algorithm="fricas")

[Out]

(2*a*c^2*e*f - (2*b*d^2*e*f - (b*c*d + a*d^2)*f^2 - (b*d^2*e*f - b*c*d*f^2)*n)*x
^3 - (b*c^2 + a*c*d)*e^2 - (2*b*d^2*e^2 + 2*b*c*d*e*f - (b*c^2 + 3*a*c*d)*f^2 -
(b*d^2*e^2 + a*d^2*e*f - (b*c^2 + a*c*d)*f^2)*n)*x^2 + (a*c*d*e^2 - a*c^2*e*f)*n
 + (2*a*c*d*e*f + 2*a*c^2*f^2 - (3*b*c*d + a*d^2)*e^2 - (b*c^2*e*f + a*c^2*f^2 -
 (b*c*d + a*d^2)*e^2)*n)*x)*(d*x + c)^(n - 3)/((2*d^2*e^2 - 4*c*d*e*f + 2*c^2*f^
2 + (d^2*e^2 - 2*c*d*e*f + c^2*f^2)*n^2 - 3*(d^2*e^2 - 2*c*d*e*f + c^2*f^2)*n)*(
f*x + e)^n)

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x+a)*(d*x+c)**(-3+n)/((f*x+e)**n),x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.229009, size = 1, normalized size = 0.01 \[ \mathit{Done} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x + a)*(d*x + c)^(n - 3)/(f*x + e)^n,x, algorithm="giac")

[Out]

Done